var mongoose = require('mongoose');
mongoose.Promise = global.Promise;
var Schema = mongoose.Schema;
var BaseModel = require('./base_model.js');

var VisitSchema   = new Schema({
    ip:  {
        type: String
    },
    info:{
        type: {}
    },
    create_at: { type: Date, default: Date.now },
    update_at: { type: Date, default: Date.now }
});

VisitSchema.plugin(BaseModel);
module.exports = mongoose.model('Visit', VisitSchema);